<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../../assets/img/favicon-144.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../../assets/img/favicon-144.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../../assets/img/favicon-72.png">
<link rel="apple-touch-icon-precomposed" href="../../assets/img/favicon-32.png">
<link rel="shortcut icon" href="../../assets/img/favicon-32.png">

<link rel="stylesheet" href="../../assets/css/vk.css"/>
<link rel="stylesheet" href="../../assets/css/prism.css"/>


<vk-title>VkImageLayout | NVK</vk-title>

<vk-centered>

  <vk-navigation>
  <vk-search-title>Search</vk-search-title>
  <vk-search>
    <input type="text" id="search" autocomplete="off" />
    <vk-search-results>
      <ol id="search-list">
        <li id="no-search-results">No Results</li>
      </ol>
    </vk-search-results>
  </vk-search>
  <vk-section-title style="margin-top: 1em;">Categories</vk-section-title>
  <vk-categories></vk-categories>
</vk-navigation>


  <vk-struct>

    <vk-name>VkImageLayout</vk-name>

    <vk-description>Layout of image and image subresources</vk-description>

    <vk-section-title>Stub</vk-section-title>
    <vk-stub>
      <pre><code class="language-js">VkImageLayout = {
  VK_IMAGE_LAYOUT_UNDEFINED: 0,
  VK_IMAGE_LAYOUT_GENERAL: 1,
  VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL: 2,
  VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL: 3,
  VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL: 4,
  VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL: 5,
  VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL: 6,
  VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL: 7,
  VK_IMAGE_LAYOUT_PREINITIALIZED: 8,
  VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL: 1000117000,
  VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL: 1000117001,
  VK_IMAGE_LAYOUT_PRESENT_SRC_KHR: 1000001002,
  VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR: 1000111000,
  VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV: 1000164003,
  VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT: 1000218000,
  VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR: VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
  VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR: VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
};</code></pre>
    </vk-stub>

    <vk-section-title>Properties</vk-section-title>

    <vk-properties>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_UNDEFINED</vk-prototype-name></vk-property-prototype>
        <vk-property-description> does not support device access. This layout <i>must</i> only be used as the <b>initialLayout</b> member of <b><a href="../structs/VkImageCreateInfo.html">VkImageCreateInfo</a></b> or <b><a href="../structs/VkAttachmentDescription.html">VkAttachmentDescription</a></b>, or as the <b>oldLayout</b> in an image transition. When transitioning out of this layout, the contents of the memory are not guaranteed to be preserved.</vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_GENERAL</vk-prototype-name></vk-property-prototype>
        <vk-property-description> supports all types of device access.</vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL</vk-prototype-name></vk-property-prototype>
        <vk-property-description> <i>must</i> only be used as a color or resolve attachment in a <b><a href="../handles/VkFramebuffer.html">VkFramebuffer</a></b>. This layout is valid only for image subresources of images created with the <b>VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT</b> usage bit enabled.</vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL</vk-prototype-name></vk-property-prototype>
        <vk-property-description> <i>must</i> only be used as a depth/stencil or depth/stencil resolve</vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL</vk-prototype-name></vk-property-prototype>
        <vk-property-description></vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL</vk-prototype-name></vk-property-prototype>
        <vk-property-description></vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL</vk-prototype-name></vk-property-prototype>
        <vk-property-description></vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL</vk-prototype-name></vk-property-prototype>
        <vk-property-description></vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_PREINITIALIZED</vk-prototype-name></vk-property-prototype>
        <vk-property-description> does not support device access. This layout <i>must</i> only be used as the <b>initialLayout</b> member of <b><a href="../structs/VkImageCreateInfo.html">VkImageCreateInfo</a></b> or <b><a href="../structs/VkAttachmentDescription.html">VkAttachmentDescription</a></b>, or as the <b>oldLayout</b> in an image transition. When transitioning out of this layout, the contents of the memory are preserved. This layout is intended to be used as the initial layout for an image whose contents are written by the host, and hence the data <i>can</i> be written to memory immediately, without first executing a layout transition. Currently, <b>VK_IMAGE_LAYOUT_PREINITIALIZED</b> is only useful with <<glossary-linear-resource,linear>> images because there is not a standard layout defined for <b>VK_IMAGE_TILING_OPTIMAL</b> images.</vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL</vk-prototype-name></vk-property-prototype>
        <vk-property-description></vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL</vk-prototype-name></vk-property-prototype>
        <vk-property-description></vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_PRESENT_SRC_KHR</vk-prototype-name></vk-property-prototype>
        <vk-property-description></vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR</vk-prototype-name></vk-property-prototype>
        <vk-property-description></vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV</vk-prototype-name></vk-property-prototype>
        <vk-property-description></vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT</vk-prototype-name></vk-property-prototype>
        <vk-property-description></vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR</vk-prototype-name></vk-property-prototype>
        <vk-property-description></vk-property-description>
      </vk-property-entry>
      <vk-property-entry>
        <vk-property-prototype>VkImageLayout.<vk-prototype-name>VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR</vk-prototype-name></vk-property-prototype>
        <vk-property-description></vk-property-description>
      </vk-property-entry>
      
    </vk-properties>

  </vk-struct>

</vk-centered>

<script>
const IS_ROOT = false;
</script>

<script type="text/javascript" src="../../assets/js/prism.min.js"></script>
<script type="text/javascript" src="../../assets/js/index.js"></script>
